/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.machineryrental.weblayer.utils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;
import org.springframework.context.i18n.LocaleContextHolder;

/**
 *
 * @author jostri
 */
public class Utils {
	
	public static SimpleDateFormat getCurrentSimpleDateFormat() {
        Locale locale = LocaleContextHolder.getLocale();

        DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
        SimpleDateFormat sf = (SimpleDateFormat) df;
        sf.setLenient(false);

        return sf;
    }
	
}
